Added `-[NSArray validateAsPropertyList]` and `-[NSDictionary validateAsPropertyList...
[adiumx.git] / Plugins / Purple Service / ESZephyrService.m
blob55e40958e9b1d4558e2fb90e397f33aa91660e1a
1 /* 
2  * Adium is the legal property of its developers, whose names are listed in the copyright file included
3  * with this source distribution.
4  * 
5  * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6  * General Public License as published by the Free Software Foundation; either version 2 of the License,
7  * or (at your option) any later version.
8  * 
9  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
10  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
11  * Public License for more details.
12  * 
13  * You should have received a copy of the GNU General Public License along with this program; if not,
14  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15  */
17 #import <Adium/AIStatusControllerProtocol.h>
18 #import "DCPurpleZephyrJoinChatViewController.h"
19 #import "ESPurpleZephyrAccount.h"
20 #import "ESPurpleZephyrAccountViewController.h"
21 #import "ESZephyrService.h"
23 @implementation ESZephyrService
25 //Account Creation
26 - (Class)accountClass{
27         return [ESPurpleZephyrAccount class];
30 - (AIAccountViewController *)accountViewController{
31     return [ESPurpleZephyrAccountViewController accountViewController];
34 - (DCJoinChatViewController *)joinChatView{
35         return [DCPurpleZephyrJoinChatViewController joinChatView];
38 //Service Description
39 - (NSString *)serviceCodeUniqueID{
40         return @"libpurple-zephyr";
42 - (NSString *)serviceID{
43         return @"Zephyr";
45 - (NSString *)serviceClass{
46         return @"Zephyr";
48 - (NSString *)shortDescription{
49         return @"Zephyr";
51 - (NSString *)longDescription{
52         return @"Zephyr";
54 - (NSCharacterSet *)allowedCharacters{
55         return [NSCharacterSet characterSetWithCharactersInString:@"+abcdefghijklmnopqrstuvwxyz0123456789._@-"];
57 - (NSCharacterSet *)allowedCharactersForUIDs{
58         return [NSCharacterSet characterSetWithCharactersInString:@"+abcdefghijklmnopqrstuvwxyz0123456789@._@-"];       
60 - (NSCharacterSet *)ignoredCharacters{
61         return [NSCharacterSet characterSetWithCharactersInString:@""];
63 - (int)allowedLength{
64         return 255;
66 - (BOOL)caseSensitive{
67         return NO;
69 - (AIServiceImportance)serviceImportance{
70         return AIServiceUnsupported;
72 - (BOOL)canCreateGroupChats{
73         return YES;
75 //No need for a password for Zephyr accounts
76 - (BOOL)supportsPassword
78         return NO;
80 - (void)registerStatuses{
81         [[adium statusController] registerStatus:STATUS_NAME_AVAILABLE
82                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AVAILABLE]
83                                                                           ofType:AIAvailableStatusType
84                                                                   forService:self];
85         
86         [[adium statusController] registerStatus:STATUS_NAME_AWAY
87                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AWAY]
88                                                                           ofType:AIAwayStatusType
89                                                                   forService:self];
90         
91         [[adium statusController] registerStatus:STATUS_NAME_INVISIBLE
92                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_INVISIBLE]
93                                                                           ofType:AIInvisibleStatusType
94                                                                   forService:self];
96         /*
97                  m = g_list_append(m, _("Online"));
98                  m = g_list_append(m, PURPLE_AWAY_CUSTOM);
99                  m = g_list_append(m, _("Hidden"));
100          */
102 @end